home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmDance
- BorderStyle = 1 'Fixed Single
- Caption = "The Dance Program"
- ClientHeight = 3135
- ClientLeft = 2205
- ClientTop = 2160
- ClientWidth = 5670
- Height = 3825
- Icon = "DANCE.frx":0000
- Left = 2145
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 209
- ScaleMode = 3 'Pixel
- ScaleWidth = 378
- Top = 1530
- Width = 5790
- Begin TegommLibCtl.Tegomm Tegomm1
- Height = 495
- Left = 1200
- TabIndex = 1
- Top = 1200
- Width = 3510
- _version = 65536
- _extentx = 6191
- _extenty = 873
- _stockprops = 64
- updateinterval = 400
- End
- Begin TeganimLib.TegoAnim TegoAnim1
- Height = 3150
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 5700
- _version = 65536
- _extentx = 10054
- _extenty = 5556
- _stockprops = 0
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuExit
- Caption = "E&xit"
- End
- End
- Begin VB.Menu mnuHelp
- Caption = "&Help"
- Begin VB.Menu mnuAbout
- Caption = "&About..."
- End
- End
- Attribute VB_Name = "frmDance"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- ' All variables must be declared.
- Option Explicit
- Private Sub Form_Click()
- TegoAnim1.CurrentFrame = TegoAnim1.CurrentFrame + 1
- End Sub
- Private Sub Form_Load()
- Dim Path
- Tegomm1.Visible = False
- ' Get the program's path.
- Path = App.Path
- If Right(Path, 1) <> "\" Then
- Path = Path + "\"
- End If
- Tegomm1.DeviceType = "WaveAudio"
- Tegomm1.filename = Path + "LASTC2M6.WAV"
- Tegomm1.Command = "Open"
- Tegomm1.Command = "Play"
- ' Create five frames for the dance animation show.
- TegoAnim1.CreateFrames (5)
- ' Fill the 5 frames with 5 pictures.
- TegoAnim1.SetFramePicture 0, LoadPicture(Path + "DANCE0.BMP")
- TegoAnim1.SetFramePicture 1, LoadPicture(Path + "DANCE1.BMP")
- TegoAnim1.SetFramePicture 2, LoadPicture(Path + "DANCE2.BMP")
- TegoAnim1.SetFramePicture 3, LoadPicture(Path + "DANCE3.BMP")
- TegoAnim1.SetFramePicture 4, LoadPicture(Path + "DANCE4.BMP")
- End Sub
- Private Sub mnuAbout_Click()
- Dim Title
- Dim Msg
- Dim CR
- CR = Chr(13) + Chr(10)
- ' Prepare the title of the About message box.
- Title = "About the Sprite2 Program"
- Msg = "This program was written with Visual "
- Msg = Msg + "Basic for Windows, using the "
- Msg = Msg + "TegoSoft Multimedia OCX control "
- Msg = Msg + "and TegoSoft Animation OCX control."
- Msg = Msg + CR + CR
- Msg = Msg + "These OCX controls "
- Msg = Msg + "are part of the TegoSoft OCX Control "
- Msg = Msg + "Kit - a collection of various OCX controls. "
- Msg = Msg + CR + CR
- Msg = Msg + "For more information about the "
- Msg = Msg + "TegoSoft OCX Control Kit, contact TegoSoft "
- Msg = Msg + "at:"
- Msg = Msg + CR + CR
- Msg = Msg + "TegoSoft Inc." + CR
- Msg = Msg + "P.O. Box 389" + CR
- Msg = Msg + "Bellmore, NY 11710"
- Msg = Msg + CR + CR
- Msg = Msg + "Phone: (516)783-4824"
- ' Display the About message box.
- MsgBox Msg, vbInformation, Title
- ' Make sure that there is playback after
- ' the user closes the modal message box.
- Tegomm1.Command = "Play"
- End Sub
- Private Sub mnuExit_Click()
- ' Terminate the program.
- Unload Me
- End Sub
- Private Sub Tegomm1_Done()
- If Tegomm1.Position = Tegomm1.Length Then
- Tegomm1.Command = "Prev"
- Tegomm1.Command = "Play"
- End If
- End Sub
- Private Sub Tegomm1_StatusUpdate()
- TegoAnim1.CurrentFrame = TegoAnim1.CurrentFrame + 1
- End Sub
-